package com.study.designpattern.factory;

/**
 * <p>添加类描述</p>
 *
 * @author chentao
 * @version v 0.1 2021/3/20 22:30
 */
public class ConcreateCreator extends  Creator {
    @Override
    public <T extends Product> T create(Class<T> c) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        Product o = (Product) Class.forName(c.getName()).newInstance();
        return (T) o;
    }
}
